package com.atguigu.eduservice.client;

import com.atguigu.eduservice.client.fallback.OrdersFileDegradeFeignClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author DengZhuo
 * @version 1.0
 * @date 2021/1/10 0010 8:42
 */
@Component
@FeignClient(value = "service-order",fallback = OrdersFileDegradeFeignClient.class)
public interface OrdersClient {
    //根据课程id和用户id查询订单表中订单状态
    @GetMapping("/eduorder/order/isBoughtCourse/{courseId}/{memberId}")
    public  boolean isBoughtCourse(@PathVariable("courseId") String courseId, @PathVariable("memberId") String memberId);
}
